package com.xiaoshuidi.cloud.module.report.dal.mapper.report;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.controller.finance.vo.DepositDetailReqVO;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.DepositDetailDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@InterceptorIgnore(tenantLine = "true")
public interface DepositDetailMapper extends BaseMapperX<DepositDetailDO> {


    @Select("select * from report_deposit_detail where handle_flag = 0")
    List<DepositDetailDO> selectListUnHandel();

    List<DepositDetailDO> selectListForPage(@Param("req") DepositDetailReqVO reqVO);

    List<DepositDetailDO> selectListForExport(@Param("req") DepositDetailReqVO reqVO);

    long countListForPage(@Param("req") DepositDetailReqVO reqVO);

    List<DepositDetailDO> selectTotalAmount(@Param("req") DepositDetailReqVO reqVO);

    @Select("select max(settlement_id) from report_deposit_detail where direction = '流出'")
    Long selectOutMaxId();
}
